package com.alibobo.utils.file;

public class PathUtils {

	public static String join(String p1, String p2) {

		if (p1.contains("/"))
			return join(p1, p2, "/");
		if (p1.contains("\\"))
			return join(p1, p2, "\\");
		return join(p1, p2, "/");
	}

	public static String join(String p1, String p2, String pat) {

		if (p1.endsWith(pat) || p2.startsWith(pat))
			return p1 + p2;
		return p1 + pat + p2;
	}

}
